Partitions
Compositions
A sequence of integers fulfilling for all , and is called a weak composition of . If, in addition, the are positive for all , then the sequence is called a composition of .
Theorem
For all positive integers and , the number of weak compositions of into parts is
Proof
The problem is certainly equivalent to counting the number of ways of putting identical balls into different boxes. Place the boxes in a line, then place the balls in them in some way and align them in the middle of the boxes. This creates a long line consisting of balls and walls separating the boxes from each other. Note that simply knowing in which order the identical balls and separating walls follow each other is the same as knowing the number of balls in each box. So our task is reduced to finding the number of ways to permute the multiset consisting of balls and walls. This number is
Corollary 1
For all positive integers and , the number of compositions of into parts is .
Proof
What if a grandparent insists on giving at least one ball to each child? The problem is not any harder. First we can give one ball to each child, then give away the remaining 16 balls to the four children in any of ways. The generalization of this argument to balls and children is the following statement.
Corollary 2
For all positive integers n, the number of all compositions of is .
Proof 1
A composition of will have at least one and at most parts. So the total number of compositions of is
Indeed, the left-hand side is the number of all subsets of , first enumerated by their size , and then summed over .
Proof 2
We prove the statement by induction on . For , the statement is true as the integer 1 has one composition. Now assume that the statement is true for , and take all compositions of . For each such composition , we will define two different compositions of . First, add one to the first element of . This way we get a composition of with the first element at least 2. Second, take , and write an additional 1 to its front. This way we get a composition of with first element 1 . It is clear that different compositions of lead to different compositions of this way. Each decomposition of can be obtained in exactly one of these two ways. Therefore, it follows that has twice as many compositions as , which was to be proved.
Set Partitions
A partition of the set is a collection of non-empty blocks so that each element of belongs to exactly one of these blocks.
The number of partitions of into nonempty blocks is denoted by . The numbers are called the Stirling numbers of the second kind.
Theorem
For all positive integers ,
Proof
As before, we can obtain a combinatorial proof by taking a close look at one particular element, say the maximum element . If this element forms a singleton block, then the remaining elements have exactly ways to complete the partition. These partitions are enumerated by the first member of the right-hand side. If, on the other hand, the element does not form a block by itself, then the remaining elements must form a partition with blocks in one of ways. Then we can add into any of the blocks formed by this partition, multiplying the number of all our possibilities by . These partitions are enumerated by the second member of the right-hand side. As the left-hand side enumerates all partitions of into blocks, the claim is proved.
Corollary 1
The number of all surjective functions is .
Proof
Such a function defines a partition of . The blocks are the subsets of elements that are mapped into the same element . Therefore, the blocks are labeled, and there are exactly of them, so the proof follows from the previous paragraph.
An interesting consequence of this is the following unexpected corollary. It is surprising as it shows that , this very compact expression, is in fact a sum of terms involving Stirling numbers.
Corollary 2
For all real numbers , and all non-negative integers ,
Proof
Both sides are polynomials of of degree . So if we can show that they agree for more than values of , we will be done. We will prove an even stronger statement, namely that the two sides agree for all positive integers .
So let be a positive integer. Then the left-hand side is the number of all functions from to . We claim that the right-hand side is the same, enumerated according to the size of the image. Indeed, if the image of such a function is of size , then there are choices for the image , then, by Corollary 1, there are choices for the function itself. As , the claim is proved.
Another way of extending our enumeration of partitions is by enumerating all partitions, without restricting the number of parts.
The number of all set partitions of into nonempty parts is denoted by , and is called the th Bell number. We also set
So . The Bell numbers also satisfy a nice recurrence relation.
Theorem
For all non-negative integers n,
Proof
We must prove that the right-hand side enumerates all partitions of . Let us assume the element is in a block of size . Then there are elements that are not in the same block as . Therefore, there are ways to choose these elements, and then there are ways to partition them. Summing over all possible values of , we get the statement of the theorem.
Integer Partitions
Let be integers so that . Then the sequence is called a partition of the integer . The number of all partitions of is denoted by . The number of partitions of into exactly parts is denoted by .
A partition of n is called self-conjugate if it is equal to its conjugate.
Theorem
The number of partitions of into at most parts is equal to that of partitions of into parts not larger than .
Proof
The first number is equal to that of Ferrers shapes of size with at most rows. The second number is equal to that of Ferrers shapes with at most columns. Finally, these two sets of Ferrers shapes are equinumerous as one can see by taking conjugates.
Theorem
The number of partitions of into distinct odd parts is equal to that of all self-conjugate partitions of .
Proof
We define a bijection from the set of self-conjugate partitions of onto that of partitions of into distinct odd parts as follows. Take any self-conjugate partition of . Take its Ferrers shape, and remove all the boxes from its first row and first column. As is self-conjugate, this means removing boxes. Set , that is, make the first part of the image of of size . Then continue this way. That is, remove the first row and column of the remaining Ferrers shape. This means removing boxes. So set . Continue this way until the entire Ferrers shape is removed. The resulting partition will be of the form . So it will indeed be a partition of into odd parts, and the parts will all be distinct, as we had . We note that the set of all boxes consisting of one fixed box , all boxes below , and all boxes on the right of , is often called a hook. Using this terminology, we can say that in each step of our algorithm, we remove the hook of the box that is currently in the top left corner of our Ferrers shape.
To see that is a bijection, it suffices to prove that for any partition of into distinct odd parts, there exists exactly one self-conjugate partition of so that . Indeed, let . Then it follows from the definition of that if , then the first row and column of must each contain boxes, the second row and second column of must each contain additional boxes, and so on. So we can build up the unique Ferrers shape whose partition has image , proving our claim.